/*
 * @Author: daiqisheng 3273889106@qq.com
 * @Date: 2022-10-20 10:35:50
 * @LastEditors: daiqisheng 3273889106@qq.com
 * @LastEditTime: 2023-04-28 10:35:01
 * @FilePath: \vite-project\src\router\index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
// 导入路由所需组件
import {
  createRouter,
  createWebHistory,
  createWebHashHistory,
  RouteRecordRaw,
} from "vue-router";
// 2.配置系统所有路由页面

const routes: Array<RouteRecordRaw> = [
  {
    path: "/",
    redirect: "/index",
  },
  {
    path: "/index",
    name: "index",
    component: () => import("../views/index/index.vue"),
  },
];

// 3.创建路由实例

const router = createRouter({
  history: createWebHistory(), // 使用history模式
  routes,
});

export default router;
